Restoring a VM
A sample SessionToken will be used throughout this use case.
The sample SessionToken will be: e65aedeb-a0e7-440c-8309-1cc0bcd920dbBase URLs are required depending on the version of VM Backup being used. <base_url> for each version is:
V8.x: http://localhost:35113/api
V9.0.x: http://localhost:36015/api
V9.1.x: http://localhost:36013/api/rest
Restoring a VM requires various parameters which can be retrieved from other calls. Hence, some prior calls need to be requested before a restore operation can be requested. The only parameter which is required before making the other calls is the BackupLocationId, which can be retrieved as described in its appropriate section further above in this document. The following list describes the required parameters and from which call can they be retrieved.
- <base_url>/restore-options/available-versions/e65aedeb-a0e7-440c-8309-1cc0bcd920db/ba2e9cdc-0d85-48e6-8db7-a45c5a40819e/e52edf12-a762-4602-a6d7-bc2386321b84
- HypervisorVirtualMachineUuid
- RestoreFromLocationId (This is located in the request which has just been made, or in this call, under the heading BackupLocationId. These should always be the same.)
- RestoreBackupVersion: One of the values in Versions
- OriginalVirtualMachineName
- BackupFolderPath:
- <base_url>/restore-options/available-versions/e65aedeb-a0e7-440c-8309-1cc0bcd920db
- RestoreToAltaroHostId: Located in AltaroHostId
- VMware Only
<base_url>/restore-options/available-datastores/e65aedeb-a0e7-440c-8309-1cc0bcd920db/1013330d-dd91-4be9-b463-fe4c3152ef6b
The rest of the parameters have to be provided at this stage, and not from any prior calls. These parameters are the following:
- RestoreToLocation: In the case of HyperV, this is the file system path where the restore is going to be stored. In the case of VMware, this is the datastore name. Datastores for a particular host can be retrieved using the available-datastores call mentioned above.
- RestoreVirtualMachineName: The new name of the virtual machine to be restored.
- DisableNicOnRestoreVirtualMachine: Whether to disable the NIC card for the restored virtual machine. In most scenarios, this is ideally set to true in order to avoid IP conflicts.
- DecryptionKey: For encrypted backups, the decryption key must be provided. This is optional and is only required for encrypted backups.
To restore from an Offsite Backup Server, simply provide the offsite BackupLocationId of the Offsite Backup Server in question, and provide the Decryption Key, since offsite backups are always encrypted.
To monitor the activity and results of the operation, refer to the Take Backup operation above.
Note: A full list of available API commands can be found here